home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / nt / ctt30.exe / OEMSETUP.INF < prev    next >
INI File  |  1994-02-17  |  36KB  |  1,381 lines

  1. ;***********************************************************************
  2. ;
  3. ; OEMSETUP.INF
  4. ;
  5. ;
  6. ; History:
  7. ;***********************************************************************
  8.  
  9. ;-----------------------------------------------------------------------
  10. ; OPTION TYPE
  11. ; -----------
  12. ; This identifies the Option type we are dealing with.  The different
  13. ; possible types are:
  14. ;
  15. ; COMPUTER, DISPLAY, MOUSE, KEYBOARD, LAYOUT, SCSI, PRINTER, ...
  16. ;
  17. ;  Types specific to networking:
  18. ;
  19. ; NetAdapter,        a netcard / adapter combination or just a netcard
  20. ; NetDriver,         just a netcard driver
  21. ; NetTransport,      a complete NDIS-compliant TDI transport stack
  22. ; NetService,        an NT networking service
  23. ; NetWork,           a complete network ensemble.
  24. ; NetProvider        a complete network which supports NT MPR protocol
  25. ;-----------------------------------------------------------------------
  26.  
  27. [Identification]
  28.     OptionType = NetAdapter
  29.  
  30. ;-----------------------------------------------------------------------
  31. ; PlatformsSupported
  32. ; ------------------
  33. ; This identifies the platforms supported by the adapter card.
  34. ; Possible types are:
  35. ;
  36. ; ISA, EISA and MCA
  37. ;-----------------------------------------------------------------------
  38.  
  39. [PlatformsSupported]
  40.     MCA
  41.  
  42. ;-----------------------------------------------------------------------
  43. ; OPTION LIST
  44. ; -----------
  45. ; This section lists the OEM Option key names.  These keys are locale
  46. ; independent and used to represent the option in a locale independent
  47. ; manner.
  48. ;
  49. ;-----------------------------------------------------------------------
  50.  
  51. [Options]
  52.     T30XX
  53.  
  54. ;***********************************************************************
  55. ; CONSTANTS FOR USING DIALOGS
  56. ;***********************************************************************
  57.  
  58. [FileConstants]
  59.  
  60.  
  61. GenericInfVersion  = " v3.1.1"
  62. GenericAdapterName = "Cabletron T30XX Token-Ring Adapter"
  63. GenericDriverName  = "Cabletron T30XX Token-Ring Driver"
  64. GenericSysName     = "T30N3.SYS"
  65. GenericName        = "T30XX"
  66.  
  67.  
  68.  
  69. ;
  70. ;  File names, etc.
  71. ;
  72. UtilityInf      = "UTILITY.INF"
  73. ParamInf        = "NCPARAM.INF"
  74. subroutineinf   = "SUBROUTN.INF"
  75. SoftwareType    = "driver"
  76. Exit_Code       = 0
  77.  
  78. ;
  79. ; EventLog Message File
  80. ;
  81. NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  82. IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  83. T30XX_LOBYTE  = 80
  84. T30XX_HIBYTE  = 00
  85. NETCARD_ID1 = { 0080}
  86.  
  87. ; Product Info
  88. ;
  89. Manufacturer    = "Microsoft"
  90. ProductMajorVersion     = "3"
  91. ProductMinorVersion     = "1"
  92. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  93.  
  94. ;
  95. ; Software
  96. ;
  97. ProductSoftwareName     = "T30XX"
  98. ProductSoftwareImagePath = "\SystemRoot\System32\drivers\"$(GenericSysName)
  99. NetRuleSoftwareType     = "T30XXSys ndisDriver T30XXDriver"
  100.  
  101. NetRuleSoftwareUse      = $(SoftwareType)
  102. NetRuleSoftwareBindForm = """T30XXSys"" yes no container"
  103.  
  104. NetRuleSoftwareClass    = {"T30XXDriver basic"}
  105. NetRuleSoftwareBindable = {"T30XXDriver T30XXAdapter non exclusive 100"}
  106. ;
  107. ; Hardware
  108. ;
  109. ProductHardwareName        = "T30XX"
  110. NetRuleHardwareType        = "T30XX T30XXAdapter"
  111. NetRuleHardwareBindForm    = " yes yes container"
  112. NetRuleHardwareClass       = {"T30XXAdapter basic"}
  113.  
  114.  
  115.  
  116. ;
  117. ; Registry Key
  118. ;
  119. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  120. ParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  121.  
  122.  
  123. [GeneralConstants]
  124. ;
  125. ;  Program flow control variables.
  126. ;
  127. from      = ""
  128. to        = ""
  129. ;
  130. ;  Return codes; Exit_Code is set to one of these
  131. ;
  132. ExitCodeOk     = 0
  133. ExitCodeCancel = 1
  134. ExitCodeFatal  = 2
  135.  
  136. KeyNull         = ""
  137. MAXIMUM_ALLOWED   = 33554432
  138. RegistryErrorIndex = NO_ERROR
  139. KeyProduct      = ""
  140. KeyParameters   = ""
  141.  
  142. TRUE            = 1
  143. FALSE           = 0
  144. NoTitle            = 0
  145.  
  146. ExitState   = "Active"
  147. OldVersionExisted = $(FALSE)
  148.  
  149. DriverPath      = $(!STF_NTPATH)\drivers
  150.  
  151. [date]
  152.     ; Now is a list which contains { Sec from 1-1-1970, Year, Month, Day, Hour,
  153.     ; Minute, Second }
  154.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  155.  
  156.  
  157. ;---------------------------------------------------------------------------
  158. ; 1. Identify
  159. ;
  160. ; DESCRIPTION:   To verify that this INF deals with the same type of options
  161. ;                as we are choosing currently.
  162. ;
  163. ; INPUT:         None
  164. ;
  165. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL
  166. ;                $($R1): Option Type (COMPUTER ...)
  167. ;                $($R2): Diskette description
  168. ;---------------------------------------------------------------------------
  169.  
  170. [Identify]
  171.     ;
  172.     ;
  173.     read-syms Identification
  174.  
  175.     set Status     = STATUS_SUCCESSFUL
  176.     set Identifier = $(OptionType)
  177.     set Media      = #("Source Media Descriptions", 2, 1)
  178.  
  179.     Return $(Status) $(Identifier) $(Media)
  180.  
  181. ;------------------------------------------------------------------------
  182. ; 2. ReturnOptions:
  183. ;
  184. ; DESCRIPTION:   To return the option list supported by this INF and the
  185. ;                localised text list representing the options.
  186. ;
  187. ;
  188. ; INPUT:         $($0):  Language used. ( ENG | FRN | ... )
  189. ;
  190. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL |
  191. ;                                STATUS_NOLANGUAGE
  192. ;                                STATUS_FAILED
  193. ;                                STATUS_NOTSUPPORTED
  194. ;
  195. ;                $($R1): Option List
  196. ;                $($R2): Option Text List
  197. ;------------------------------------------------------------------------
  198.  
  199. [ReturnOptions]
  200.     ;
  201.     ;
  202.     set Status        = STATUS_FAILED
  203.     set OptionList     = {}
  204.     set OptionTextList = {}
  205.  
  206.     ;
  207.     ; Check if the language requested is supported
  208.     ;
  209.     set LanguageList = ^(LanguagesSupported, 1)
  210.     Ifcontains(i) $($0) in $(LanguageList)
  211.     ;
  212.     ; Check if the platforms requested is supported
  213.     ;
  214.     ifstr(i) $($1) == ""
  215.             goto returnoptions
  216.     endif
  217.  
  218.     set PlatformList = ^(PlatformsSupported, 1)
  219.     Ifcontains(i) $($1) in $(PlatformList)
  220.             goto returnoptions
  221.     else
  222.             set Status = STATUS_NOTSUPPORTED
  223.             goto finish_ReturnOptions
  224.     endif
  225.     else
  226.         set Status = STATUS_NOLANGUAGE
  227.         goto finish_ReturnOptions
  228.     endif
  229.  
  230.     ;
  231.     ; form a list of all the options and another of the text representing
  232.     ;
  233.  
  234. returnoptions = +
  235.     set OptionList     = ^(Options, 1)
  236.     set OptionTextList = ^(OptionsText$($0), 1)
  237.     set Status         = STATUS_SUCCESSFUL
  238.  
  239. finish_ReturnOptions = +
  240.     Return $(Status) $(OptionList) $(OptionTextList)
  241.  
  242. ;------------------------------------------------------------------------
  243. ;
  244. ; InstallOption:
  245. ;
  246. ;      This section is shelled to by main installation processing
  247. ;      or by NCPASHEL.INF during reconfig, removal, update, etc.
  248. ;
  249. ;
  250. ; FUNCTION:  To copy files representing Options
  251. ;            To configure the installed option
  252. ;            To update the registry for the installed option
  253. ;
  254. ; INPUT:     $($0):  Language to use
  255. ;            $($1):  OptionID to install
  256. ;            $($2):  SourceDirectory
  257. ;            $($3):  AddCopy  (YES | NO)
  258. ;            $($4):  DoCopy   (YES | NO)
  259. ;            $($5):  DoConfig (YES | NO)
  260. ;
  261. ; OUTPUT:    $($R0): STATUS: STATUS_SUCCESSFUL |
  262. ;                            STATUS_NOLANGUAGE |
  263. ;                            STATUS_USERCANCEL |
  264. ;                            STATUS_FAILED
  265. ;
  266. ;------------------------------------------------------------------------
  267. [InstallOption]
  268.     ;
  269.     ; Set default values for
  270.     ;
  271.     set Status   = STATUS_FAILED
  272.     ;
  273.     ; extract parameters
  274.     ;
  275.     set Option   = $($1)
  276.     set SrcDir   = $($2)
  277.     set AddCopy  = $($3)
  278.     set DoCopy   = $($4)
  279.     set DoConfig = $($5)
  280.  
  281.     ;
  282.     ; Check if the language requested is supported
  283.     ;
  284.     set LanguageList = ^(LanguagesSupported, 1)
  285.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  286.     Return STATUS_NOLANGUAGE
  287.     endif
  288.  
  289.     set-subst LF = "\n"
  290.  
  291.     read-syms GeneralConstants
  292.     read-syms FileConstants
  293.  
  294.     read-syms DialogConstants$(!STF_LANGUAGE)
  295.     ifstr(i) $(!NTN_Origination) == "NCPA"
  296.     set Continue = $(OK)
  297.     endif
  298.     read-syms FileConstants$(!STF_LANGUAGE)
  299.  
  300.     detect date
  301.  
  302.     set-title  $(FunctionTitle)
  303.  
  304.     set to   = Begin
  305.     set from = Begin
  306. ;
  307. ;  Assume all is well.
  308. ;
  309.     set CommonStatus = STATUS_SUCCESSFUL
  310.  
  311.     EndWait
  312.  
  313. ;
  314. ;   Set up the operation-mode-based variables and gaily welcome
  315. ;   the user.  If the "install mode" variable is improperly set,
  316. ;   assume this is a new installation.
  317. ;
  318.  
  319. Begin = +
  320.     Set ActivateDetection = FALSE
  321.  
  322.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  323.     set StartLabel = removeadapter
  324.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  325.     set StartLabel = UpgradeSoftware
  326.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  327.     set StartLabel = bindingadapter
  328.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  329. ;        set ActivateDetection = TRUE
  330.     set StartLabel = configureadapter
  331.     ;
  332.     ;   You cannot config the software component
  333.     ;
  334.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  335.         Debug-Output "Cannot configure the Cabletron T30XX driver software."
  336.         Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  337.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  338.         Debug-Output "ShellCode error: cannot get an error string."
  339.         goto ShellCodeError
  340.         endif
  341.         set Error = $($R0)
  342.         set from = end
  343.         set to = end
  344.         goto nonfatalinfo
  345.     endif
  346.     else
  347. ;        set ActivateDetection = TRUE
  348.     set StartLabel = installadapter
  349.     set OEM_ABANDON_OPTIONS = {}
  350.     set OEM_ABANDON_SOFTWARE = FALSE
  351.     set OEM_ABANDON_ON = TRUE
  352.     endif
  353.  
  354.  
  355.  
  356.     ;  set the default values
  357.  
  358.     ; Packetsize = 4500
  359.     set PacketsizeValue = *($(PacketsizeList), 4)
  360.  
  361.     Set from = $(fatal)
  362.     Set to = $(fatal)
  363.     Goto $(StartLabel)
  364.  
  365. ;-----------------------------------------------
  366. ; Installation Section
  367. ;-----------------------------------------------
  368.  
  369. installadapter = +
  370. ;
  371. ;   First, check whether the same version of the software exists
  372. ;
  373.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  374.  
  375.     Ifstr $(KeyProduct) != $(KeyNull)
  376.     ;
  377.     ; Same version already existed in the local machine
  378.     ; Popup the dialog and ask the user whether he wants to continue
  379.     ;
  380.     CloseRegKey $(KeyProduct)
  381.  
  382.     ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  383.        ;
  384.        ; Cannot Install the same software again
  385.        ;
  386.        Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  387.            $(ProductVersion)
  388.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  389.            Debug-Output "ShellCode error: cannot get an error string."
  390.            goto ShellCodeError
  391.        endif
  392.  
  393.        goto end
  394.     else
  395.        ;
  396.        ; Add a new adapter card?
  397.        ;
  398.        Shell $(UtilityInf), CardExistedDlg
  399.  
  400.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  401.            Debug-Output "ShellCode error: cannot get an error string."
  402.            goto ShellCodeError
  403.        endif
  404.  
  405.        ifstr(i) $($R1) != "OK"
  406.            goto end
  407.        endif
  408.        set OldVersionExisted = $(TRUE)
  409.     endif
  410.     endif
  411.  
  412. ;
  413. ;  dll load addition
  414. ;
  415.     Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) NO
  416.  
  417.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  418.     Goto ShellCodeError
  419.     Else-Ifstr(i) $($R0) == STATUS_FAILED
  420.     Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  421.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  422.         goto ShellCodeError
  423.     endif
  424.     set Error = $($R0)
  425.     Goto fatal
  426.     Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  427.     Goto successful
  428.     Endif
  429.  
  430.     Set SrcDir = $($R1)
  431.  
  432.     install "Install-Dll"
  433.  
  434.     goto adaptersetup
  435.  
  436. ;-----------------------------------------------
  437. ; Configuration Section
  438. ;-----------------------------------------------
  439. ;
  440. ;   Get the current values of all the parameters
  441. ;
  442. configureadapter = +
  443.     Ifstr $(KeyProduct) == $(KeyNull)
  444.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  445.     Ifstr $(KeyProduct) == $(KeyNull)
  446.         set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  447.         Debug-Output "Cannot find component product key"
  448.         goto fatalregistry
  449.     Endif
  450.     Endif
  451.  
  452.     ;
  453.     ; Get the other parameters;  they're attached to the service parameters key
  454.     ;
  455.     Debug-Output "INF: Shelling to FindService"
  456.     Shell $(UtilityInf) FindService, $(KeyProduct)
  457.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  458.     Debug-Output "INF: FindService shell failure"
  459.     Goto ShellCodeError
  460.     Endif
  461.     Ifstr(i) $($R0) != NO_ERROR
  462.     Debug-Output "INF: FindService Shell error: "$($R0)
  463.     Goto fatalregistry
  464.     endif
  465.  
  466.     Set KeyParameters = $($R2)
  467.  
  468.     ;
  469.     ;  We don't need the services key, so close it.
  470.     ;
  471.     CloseRegKey $($R1)
  472.  
  473.     Ifstr $(KeyParameters) == $(KeyNull)
  474.     set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  475.     Debug-Output "Cannot find component service"
  476.     goto fatalregistry
  477.     endif
  478.  
  479.     set OldVersionExisted = $(TRUE)
  480.  
  481.     set ValueName = ""
  482.     set ValueData = ""
  483.     set ValueStr  = ""
  484.     set ValueList = {}
  485.  
  486.  
  487.     ;
  488.     ; Get the old values
  489.     ;
  490.     EnumRegValue $(KeyParameters) ValueList
  491.  
  492.     ForListDo $(ValueList)
  493.     set ValueItem = $($)
  494.     set ValueName = *($(ValueItem),1)
  495.     set ValueData = *($(ValueItem),4)
  496.     ifstr(i) $(ValueName) == "Packetsize"
  497.        set PacketsizeIndex = $(ValueData)
  498.     else-Ifstr(i) $(ValueName) == "NetworkAddress"
  499.        set NetworkAddress = $(ValueData)
  500.     endif
  501.  
  502.  
  503.     EndForListDo
  504.  
  505.  
  506.     set PacketsizeValue = *($(PacketsizeList), ~($(PacketsizeValues),$(PacketsizeIndex)))
  507.     ifstr(i) $(PacketsizeValue) == ""
  508.     set PacketsizeValue = *($(PacketsizeList), 4)
  509.     endif
  510.  
  511.     ;  Save the settings as they were read from the Registry.
  512.  
  513. ;    Shell $(ParamInf) Param_SaveValues
  514. ;    Set CurrParamSettings = $($R0)
  515. ;
  516. ;   Put up the adapter configuration dialog if necessary.
  517. ;
  518. ;   Note that $(CurrParamSettings) has the old known parameter values.
  519. ;
  520. adaptersetup = +
  521.  
  522.  
  523. ;    Shell "" DebugConfiguration "before displaying dialog"
  524.  
  525.     Set from = adapteroptions
  526.  
  527.  
  528. adapteroptions = +
  529.  
  530.  
  531.     ; ARE WE MCA
  532.  
  533.     set EISABUS = FALSE
  534.     set MCABUS = FALSE
  535.     set ISABUS = TRUE
  536.     Debug-Output "Find MCA Card."
  537.     set InfoList = {}
  538.     Shell $(UtilityInf), MCAFindBus, $(T30XX_LOBYTE), $(T30XX_HIBYTE)
  539.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  540.     goto next_id
  541.     endif
  542.     ifstr $($R0) != "NO_ERROR"
  543.     set Error = $($R0)
  544.     goto next_id
  545.     endif
  546.     ifstr(i) $($R1) == {}
  547.     goto next_id
  548.     endif
  549.  
  550.     set AdapterList = $($R1)
  551.  
  552.     ForListDo $(AdapterList)
  553.     set BusNum = *($($),1)
  554.     set SlotNum = *($($),2)
  555.     set mcaid = *($($),3)
  556.  
  557.     set InfoList = >($(InfoList),{$(SlotNum),$(mcaid)})
  558.     EndForListDo
  559.  
  560.  
  561. next_id = +
  562.      goto found_mca
  563.  
  564. found_mca = +
  565.     set MCABUS = TRUE
  566.     set ISABUS = FALSE
  567.     Debug-Output "Find MCA card."$(InfoList)
  568.  
  569.     ; DONE MCA 
  570.  
  571.  
  572. found_bus = +
  573.  
  574.  
  575.     LoadLibrary "T30N3.SYS" $(DialogDllName) hLib
  576.  
  577.     read-syms FileDependentDlg$(!STF_LANGUAGE)
  578.  
  579.     ui start "InputDlg"  $(hLib)
  580.  
  581.     set ExitButton      = $(ButtonPressed)
  582.  
  583.     FreeLibrary $(hLib)
  584.  
  585.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  586.         set PacketsizeIndex = $(Combo1Out)
  587.         set NetworkAddress = *($(EditTextOut),1)
  588.         ui pop 1
  589.     else-ifstr(i) $(DLGEVENT) == "EXIT"
  590.         set CommonStatus = STATUS_USERCANCEL
  591.         Debug-Output "Action: exit. Bye."
  592.         ui pop 1
  593.         goto end
  594.     else
  595.         ;
  596.         ; Unknow command
  597.         ;
  598.         ui pop 1
  599.         Debug-Output "Action: unknown. Bye."
  600.         goto end
  601.     endif
  602.  
  603.  
  604. ;
  605. ;   If installing, go create the necessary keys;
  606. ;   if configuring, they're already open.
  607. ;
  608. skipoptions =+
  609.  
  610.     ifint $(OldVersionExisted) == $(TRUE)
  611.     ifstr(i) $(!NTN_InstallMode) == configure
  612.         goto writeparameters
  613.     endif
  614.     endif
  615.     StartWait
  616.     ;
  617.     ; Add Software Component
  618.     ;
  619.     ifint $(OldVersionExisted) == $(FALSE)
  620.  
  621.     ifstr(i) $(!NTN_InstallMode) == "install"
  622.        Ifstr(i) $(DoCopy) == "YES"
  623.  
  624.           Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  625.  
  626.           Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  627.           Goto ShellCodeError
  628.           Else-Ifstr(i) $($R0) == STATUS_FAILED
  629.           Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  630.           ifint $($ShellCode) != $(!SHELL_CODE_OK)
  631.               goto ShellCodeError
  632.           endif
  633.           set Error = $($R0)
  634.           Goto fatal
  635.           Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  636.           Goto successful
  637.           Endif
  638.  
  639.           Set SrcDir = $($R1)
  640.  
  641.        Endif
  642.  
  643.        install "Install-Option"
  644.  
  645.        ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  646.           Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  647.           ifint $($ShellCode) != $(!SHELL_CODE_OK)
  648.           goto ShellCodeError
  649.           endif
  650.           set Error = $($R0)
  651.           goto fatal
  652.        endif
  653.     endif
  654.  
  655.  
  656.  
  657.     Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  658.         $(ProductSoftwareName), +
  659.         $(ProductSoftwareName), +
  660.         $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  661.         $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  662.         $(NetEventDLL)
  663.  
  664.     Set OEM_ABANDON_SOFTWARE = TRUE
  665.  
  666.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  667.         Debug-Output "ShellCode error"
  668.         goto ShellCodeError
  669.     endif
  670.     ;
  671.     ;   At this point:
  672.     ;     $R1 contains the product version key handle;
  673.     ;     $R2 contains the NetRules subkey handle;
  674.     ;     $R3 contains the new Services key handle; and
  675.     ;     $R4 contains the Parameters key
  676.     ;     $R5 contains the Linkage Key
  677.     ;
  678.     set RegistryErrorIndex = $($R0)
  679.     set KeyProduct      = $($R1)
  680.     Set SoftNetRulesKey = $($R2)
  681.     CloseRegKey $($R3)
  682.     CloseRegKey $($R4)
  683.     CloseRegKey $($R5)
  684.  
  685.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  686.         EndWait
  687.         Debug-Output "Registry error: add software components"
  688.         CloseRegKey $(KeyProduct)
  689.         CloseRegKey $(SoftNetRulesKey)
  690.         goto fatalregistry
  691.     endif
  692.  
  693.     set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  694.                {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  695.                {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  696.                {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  697.                {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  698.                {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  699.                {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  700.  
  701.     Shell  $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)
  702.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  703.         Debug-Output "ShellCode error."
  704.         goto ShellCodeError
  705.     endif
  706.  
  707.     set RegistryErrorIndex = $($R0)
  708.  
  709.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  710.         EndWait
  711.         Debug-Output "Registry error: add value list."
  712.         CloseRegKey $(KeyProduct)
  713.         CloseRegKey $(SoftNetRulesKey)
  714.         goto fatalregistry
  715.     endif
  716.  
  717.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  718.                 {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  719.                 {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  720.                 {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  721.                 {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  722.                 {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  723.  
  724.     Shell  $(UtilityInf), AddValueList, $(SoftNetRulesKey), $(NewValueList)
  725.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  726.         Debug-Output "ShellCode error."
  727.         goto ShellCodeError
  728.     endif
  729.  
  730.     set RegistryErrorIndex = $($R0)
  731.  
  732.     CloseRegKey $(KeyProduct)
  733.     CloseRegKey $(SoftNetRulesKey)
  734.  
  735.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  736.         EndWait
  737.         Debug-Output "Resgitry error: add value list."
  738.         goto fatalregistry
  739.     endif
  740.     endif
  741. ;
  742. ;   Create the HARDWARE\Netcard region and its corresponding service
  743. ;
  744.     Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  745.  
  746.     ifint $($R4) != -1
  747.     Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  748.     endif
  749.  
  750.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  751.     Debug-Output "Cannot add hardware component"
  752.     goto ShellCodeError
  753.     endif
  754.  
  755.     set RegistryErrorIndex = $($R0)
  756.  
  757.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  758.     EndWait
  759.     Debug-Output "Registry error: add hardware component"
  760.     CloseRegKey $($R1)
  761.     CloseRegKey $($R2)
  762.     CloseRegKey $($R3)
  763.     goto fatalregistry
  764.     endif
  765.  
  766. ;
  767. ;   At this point:
  768. ;     $R1  Registry key variable for HARDWARE\Netcard\(n)
  769. ;     $R2  Registry key variable for HARDWARE\Netcard\(n)\\NetRules
  770. ;     $R3  Registry key handle for <service>\Parameters key
  771. ;     $R4  Adapter number assigned to adapter
  772. ;     $R5  Service name generated by combining svc name with adapter number
  773. ;
  774.     set KeyParameters = $($R3)
  775.     set KeyAdapterRules = $($R2)
  776.     set AdapterNumber = $($R4)
  777.  
  778.     set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  779.                {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  780.                {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  781.                {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  782.                {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  783.                {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  784.  
  785.     Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  786.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  787.     Debug-Output "ShellCode error"
  788.     goto ShellCodeError
  789.     endif
  790.  
  791.     CloseRegKey $($R1)
  792.  
  793.     set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  794.     set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  795.  
  796.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  797.             {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  798.             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  799.             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  800.  
  801.     Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  802.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  803.     Debug-Output "ShellCode error."
  804.     goto ShellCodeError
  805.     endif
  806.  
  807.     set RegistryErrorIndex = $($R0)
  808.  
  809.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  810.     EndWait
  811.     Debug-Output "Resgitry error: add value list."
  812.     CloseRegKey $(KeyParameters)
  813.     CloseRegKey $(KeyAdapterRules)
  814.     goto fatalregistry
  815.     endif
  816.  
  817.     CloseRegKey $(KeyAdapterRules)
  818.  
  819.     goto writeparameters
  820. ;
  821. ;   REQUIRED:   $(KeyParameters) contains service Parameters key handle
  822. ;
  823. writeparameters = +
  824.     Shell $(UtilityInf), GetBusTypeNum
  825.     set BusTypeNum = $($R1)
  826.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  827.     Debug-Output "ShellCode error."
  828.     goto ShellCodeError
  829.     endif
  830.  
  831.     set PacketsizeValue = *($(PacketsizeValues), ~($(PacketsizeList),$(PacketsizeIndex)))
  832.  
  833.     set NetworkAddress = *($(EditTextOut),1)
  834.  
  835.     Debug-Output "WRITE PARAMETERS"
  836.  
  837.     ifstr(i) $(MCABUS) == TRUE
  838.  
  839.     Ifstr $(AdapterNumber) == $(KeyNull)
  840.     ; configure adapter not new installation
  841.  
  842.     set NewValueList = {{NetworkAddress,$(NoTitle),$(!REG_VT_SZ),$(NetworkAddress)},+
  843.             {Packetsize,     $(NoTitle),$(!REG_VT_DWORD),$(PacketsizeValue)}}
  844.     else    
  845.     Debug-Output "Adapter number "$(AdapterNumber)
  846.  
  847.     Set Indx = 0
  848.     ForListDo $(InfoList)
  849.         Debug-Output "InfoList-1"$(InfoList)
  850.         Set-add Indx = $(Indx),1
  851.  
  852.         Debug-Output "InfoList"$(InfoList)
  853.  
  854.         set SlotNum = *($($),1)
  855.         set mcaid = *($($),2)
  856.         Debug-Output "slot number "$(SlotNum)
  857.         Debug-Output "mca pos id "$(mcaid)
  858.  
  859.         Ifint $(Indx) == $(AdapterNumber)
  860.             goto write_mca
  861.         endif
  862.     EndForListDo
  863.  
  864. write_mca=+
  865.     set NewValueList = {{NetworkAddress,$(NoTitle),$(!REG_VT_SZ),$(NetworkAddress)},+
  866.             {McaPosId,$(NoTitle),$(!REG_VT_DWORD),$(mcaid)},+
  867.             {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(SlotNum)},+
  868.             {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
  869.             {MediaType,$(NoTitle),$(!REG_VT_DWORD),2},+
  870.             {Packetsize,     $(NoTitle),$(!REG_VT_DWORD),$(PacketsizeValue)}}
  871.     Debug-Output "WRITE PARAMETERS -- MCA"
  872.     endif
  873.  
  874.     endif
  875.   
  876.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  877.     CloseRegKey $(KeyParameters)
  878.  
  879.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  880.     Debug-Output "ShellCode error."
  881.     goto ShellCodeError
  882.     endif
  883.  
  884.     set RegistryErrorIndex = $($R0)
  885.  
  886.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  887.     Debug-Output "Registry error: Add value list"
  888.     goto fatalregistry
  889.     endif
  890.  
  891.     EndWait
  892.  
  893.  
  894.     goto successful
  895.  
  896. ;-----------------------------------------------
  897. ; Binding section
  898. ;-----------------------------------------------
  899. bindingadapter =+
  900.     set Error = "Binding: Sorry, not yet implemented."
  901.     goto fatal
  902.  
  903. ;-----------------------------------------------
  904. ; Removeadapter section
  905. ;-----------------------------------------------
  906.  
  907. removeadapter = +
  908.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  909.     ; Remove Software Component
  910.     Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  911.         $(ProductSoftwareName)
  912.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  913.         Debug-Output "ShellCode error"
  914.         goto ShellCodeError
  915.     endif
  916.  
  917.     set RegistryErrorIndex = $($R0)
  918.  
  919.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  920.         goto fatalregistry
  921.     endif
  922.     else
  923.     Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  924.         $(ProductSoftwareName), $(!NTN_RegBase)
  925.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  926.         Debug-Output "ShellCode error"
  927.         goto ShellCodeError
  928.     endif
  929.  
  930.     set RegistryErrorIndex = $($R0)
  931.  
  932.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  933.         goto fatalregistry
  934.     endif
  935.     endif
  936.  
  937.     goto end
  938.  
  939. ;-----------------------------------------------
  940. ; Upgrade Software section
  941. ;-----------------------------------------------
  942.  
  943. UpgradeSoftware = +
  944.     ;
  945.     ; First determine whether we want to do upgrade or update for software
  946.     ; or hardware component. Then we will determine whether the Mode is
  947.     ; update or upgrade.
  948.     ;
  949.     ; If the same version of the product existed in the registry, we do
  950.     ; update. Otherwise, we will do a upgrade
  951.     ;
  952.     ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  953.     ; Upgrade software component
  954.     ;
  955.     ; see whether the same version exist or not
  956.     ;
  957.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  958.  
  959.     Ifstr $(KeyProduct) != $(KeyNull)
  960.         GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
  961.         set Version = *($(VersionInfo), 4)
  962.  
  963.         ;
  964.         ; Update the binaries
  965.         ;
  966.         Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  967.  
  968.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  969.         Debug-Output "ShellCode error"
  970.         goto ShellCodeError
  971.         endif
  972.  
  973.         set !UG_Filename = $($R0)
  974.  
  975.         ifstr(i) $(!UG_Filename) != ""
  976.         install "Install-Update"
  977.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  978.             goto fatal
  979.         endif
  980.         endif
  981.  
  982.         ; Upgrade the version number
  983.         ;
  984.         SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  985.         SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  986.  
  987.         ;
  988.         ; do nothing for update
  989.         ;
  990.         ifint $(Version) != $(ProductVersion)
  991.            ;
  992.            ; If the major version number is not the same,
  993.            ; it is major upgrade. So let Upgrade the product
  994.            ;
  995.            ;
  996.            ; make other upgrade change if necessary
  997.            ;
  998.         endif
  999.         CloseRegKey $(KeyProduct)
  1000.     else
  1001.         ;
  1002.         ; Cannot Open software key, goto ERROR
  1003.         ;
  1004.         goto fatalregistry
  1005.     endif
  1006.     else
  1007.     ;
  1008.     ; upgrade/update hardware component
  1009.     ; There is no different between upgrade and update for hardware
  1010.     ; component
  1011.     ;
  1012.     ; 1. Get the Service Name
  1013.     ; 2. Change the NetRule section if necessary
  1014.     ;
  1015.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) +
  1016.           $(MAXIMUM_ALLOWED) NetworkCardKey
  1017.     Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  1018.         ;
  1019.         ; Get Service name
  1020.         ;
  1021.         GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
  1022.         set ServiceName = *($(ServiceNameInfo), 4)
  1023.  
  1024.         ;
  1025.         ; Change the NetRule if necessary
  1026.         ;
  1027.         OpenRegKey $(NetworkCardKey) "" "NetRules" +
  1028.         $(MAXIMUM_ALLOWED) NetRuleKey
  1029.         Ifstr(i) $(NetRuleKey) != $(KeyNull)
  1030.         ;
  1031.         ; Make the change....
  1032.         ;
  1033.         else
  1034.         ;
  1035.         ; Error, cannot open net rules key
  1036.         ;
  1037.         goto fatalregistry
  1038.         endif
  1039.  
  1040.         CloseRegKey $(NetRules)
  1041.         CloseRegKey $(NetworkCardKey)
  1042.     else
  1043.         ;
  1044.         ; Error, cannot open network card key
  1045.         ;
  1046.         goto fatalregistry
  1047.     endif
  1048.     ;
  1049.     ; 3. Change the service section of the hardware. i.e.,
  1050.     ;    ParameterName change, value change, etc.
  1051.     ;
  1052.     OpenRegKey $(!REG_H_LOCAL) "" +
  1053.           $(!NTN_ServiceBase)"\"$(ServiceName) +
  1054.           $(MAXIMUM_ALLOWED) ServiceKey
  1055.  
  1056.     Ifstr(i) $(ServiceKey) != $(KeyNull)
  1057.         ;
  1058.         ; Get the ServiceKey to change the Start value
  1059.         ; or Type value. Or open Parameters key to
  1060.         ; change the hardware parameters if necessary.
  1061.         ;
  1062.         CloseRegKey $(ServiceKey)
  1063.     else
  1064.         ;
  1065.         ; Error, cannot open network card key
  1066.         ;
  1067.         goto fatalregistry
  1068.     endif
  1069.     endif
  1070.  
  1071.     goto end
  1072.     ;
  1073.     ; End of Upgrade Software
  1074.     ;
  1075.  
  1076. ;
  1077. ;  Escape hatches
  1078. ;
  1079. successful = +
  1080.     goto end
  1081.  
  1082. abandon = +
  1083.     ForListDo $(OEM_ABANDON_OPTIONS)
  1084.     Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  1085.         $(ProductSoftwareName), $($)
  1086.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1087.         Debug-Output "ShellCode error"
  1088.         goto ShellCodeError
  1089.     endif
  1090.  
  1091.     set RegistryErrorIndex = $($R0)
  1092.  
  1093.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1094.         goto fatalregistry
  1095.     endif
  1096.     EndForListDo
  1097.  
  1098.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  1099.     ; Remove Software Component
  1100.     Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  1101.         $(ProductSoftwareName), FALSE
  1102.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1103.         Debug-Output "ShellCode error"
  1104.         goto ShellCodeError
  1105.     endif
  1106.  
  1107.     set RegistryErrorIndex = $($R0)
  1108.  
  1109.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1110.         goto fatalregistry
  1111.     endif
  1112.     endif
  1113.  
  1114.     goto end
  1115.  
  1116. ;
  1117. ; warning display
  1118. ;
  1119. warning = +
  1120.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  1121.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1122.     goto ShellCodeError
  1123.     endif
  1124.     ifstr(i) $($R1) == "OK"
  1125.     goto $(to)
  1126.     else-ifstr(i) $($R1) == "CANCEL"
  1127.     goto $(from)
  1128.     else
  1129.     goto "end"
  1130.     endif
  1131. ;
  1132. ; non fatal error display
  1133. ;
  1134. nonfatalinfo = +
  1135.     Set Severity = STATUS
  1136.     Set CommonStatus = STATUS_USERCANCEL
  1137.     goto nonfatalmsg
  1138. nonfatal = +
  1139.     Set Severity = NONFATAL
  1140.     goto nonfatalmsg
  1141. nonfatalmsg = +
  1142.     ifstr(i) $(Error) == ""
  1143.     Set Severity = NONFATAL
  1144.     Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1145.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1146.         goto ShellCodeError
  1147.     endif
  1148.     set Error = $($R0)
  1149.     endif
  1150.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  1151.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1152.     goto ShellCodeError
  1153.     endif
  1154.     ifstr(i) $($R1) == "OK"
  1155.     goto $(from)
  1156.     else
  1157.     goto "end"
  1158.     endif
  1159.  
  1160. ;
  1161. ;  Registry is broken
  1162. ;
  1163. fatalregistry = +
  1164.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  1165.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1166.     goto ShellCodeError
  1167.     endif
  1168.     set Error = $($R0)
  1169.     goto fatal
  1170. ;
  1171. ;  Netcard detection failure
  1172. ;
  1173. fataldetect = +
  1174.     Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  1175.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1176.     Debug-Output "ShellCode error: cannot get an error string."
  1177.     goto ShellCodeError
  1178.     endif
  1179.     set Error = $($R0)
  1180.     Goto fatal
  1181. ;
  1182. ; fatal error display
  1183. ;
  1184. fatal = +
  1185.     ifstr(i) $(Error) == ""
  1186.     Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1187.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1188.         goto ShellCodeError
  1189.     endif
  1190.     set Error = $($R0)
  1191.     endif
  1192.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  1193.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1194.     goto ShellCodeError
  1195.     endif
  1196.  
  1197.     goto setfailed
  1198.  
  1199. ;
  1200. ;  Shelling error
  1201. ;
  1202. ShellCodeError = +
  1203.     set DlgType      = "MessageBox"
  1204.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  1205.     set STF_MB_TEXT  = $(ShellCodeErrorText) 
  1206.     set STF_MB_TYPE  = 1
  1207.     set STF_MB_ICON  = 3
  1208.     set STF_MB_DEF   = 1
  1209.     ui start "Error Message"
  1210.     goto setfailed
  1211.  
  1212. setfailed = +
  1213.     set CommonStatus = STATUS_FAILED
  1214.     ;
  1215.     ; if OEM_ABANDON_ON == TRUE, then remove the registry entries
  1216.     ;
  1217.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  1218.     set OEM_ABANDON_ON = FALSE
  1219.     goto abandon
  1220.     endif
  1221.     goto end
  1222.  
  1223. end = +
  1224.     goto term
  1225.  
  1226. term = +
  1227.  
  1228.     Return $(CommonStatus)
  1229.  
  1230. [DebugConfiguration]
  1231.  
  1232.     Set InfName = "OEMSETUP.INF"
  1233.  
  1234.     return
  1235.  
  1236.  
  1237. ;***************************************************************
  1238. ;  INSTALL SECTIONS
  1239. ;***************************************************************
  1240. [Install-Option]
  1241.     set STF_VITAL = ""
  1242.  
  1243.     ifstr(i) $(AddCopy) == "YES"
  1244.  
  1245.     ;
  1246.     ; Add the files to the copy list
  1247.     ;
  1248.     ;  BUGBUG: eliminate the "nt2" in the next line when Sunil fixes
  1249.     ;      the other INF files
  1250.     ;
  1251.     AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1252.  
  1253.     endif
  1254.  
  1255.     ifstr(i) $(DoCopy) == "YES"
  1256.  
  1257.        ;
  1258.        ; Copy files in the copy list
  1259.        ;
  1260.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1261.        CopyFilesInCopyList
  1262.  
  1263.     endif
  1264.  
  1265.     Exit
  1266.  
  1267. [Install-Update]
  1268.    set STF_VITAL        = ""
  1269.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  1270.    ;set STF_VERSION     = "YES"
  1271.  
  1272.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1273.    AddSectionFilesToCopyList Files-Dll $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1274.    AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1275.  
  1276.    set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1277.    CopyFilesInCopyList
  1278.  
  1279.    exit
  1280.  
  1281.  
  1282. [Install-Dll]
  1283.    set STF_VITAL        = ""
  1284.    AddSectionFilesToCopyList Files-Dll $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1285.    set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1286.    CopyFilesInCopyList
  1287.    exit
  1288.  
  1289. [Source Media Descriptions]
  1290.     2  = "Cabletron T30XX Driver Disk"  , TAGFILE = T30N3.SYS
  1291.  
  1292. [ProductType]
  1293. STF_PRODUCT  = Winnt
  1294. STF_PLATFORM = I386
  1295.  
  1296. [Files-Inf]
  1297. 2,      oemsetup.inf,    SIZE=1000,     RENAME=$(!UG_Filename)
  1298.  
  1299. [Files-T30XX]
  1300. 2, T30N3.SYS , SIZE=88888
  1301.  
  1302. [Files-Dll]
  1303. 2, ctrondlg.dll,  SIZE=999
  1304.  
  1305. [LanguagesSupported]
  1306.     ENG
  1307.  
  1308. [OptionsTextENG]
  1309.     T30XX      = "Cabletron T30XX Token-Ring Adapter"
  1310.  
  1311. [FileConstantsENG]
  1312. ProCaption   = "Windows NT Setup"
  1313. ProCancel    = "Cancel"
  1314. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  1315.            "Are you sure you want to cancel copying files?"
  1316. ProCancelCap = "Network Setup Message"
  1317. ProText1     = "Copying:"
  1318. ProText2     = "To:"
  1319.  
  1320. FunctionTitle   = $(GenericAdapterName)" Setup"$(GenericInfVersion)
  1321.  
  1322. ProductSoftwareDescription = $(GenericDriverName)
  1323. ProductHardwareDescription = $(GenericAdapterName)
  1324.  
  1325. ProductSoftwareTitle =       $(GenericDriverName)
  1326. ProductHardwareT30XXTitle =       $(GenericAdapterName)
  1327.  
  1328. DialogDllName   = "ctrondlg.dll"
  1329.  
  1330. PacketsizeList = ^(PacketsizeChoices,1)
  1331. PacketsizeValues = ^(PacketsizeChoices,2)
  1332.  
  1333. [DialogConstantsENG]
  1334. Help        = "&Help"
  1335. Exit        = "&Cancel"
  1336. OK          = "&OK"
  1337. HelpContext = ""
  1338. Continue    = "Con&tinue"
  1339. Cancel      = "&Cancel"
  1340.  
  1341. [FileDependentDlgENG]
  1342.  
  1343. DlgText = "Please select values for the following fields:"
  1344. HelpContext = 6111
  1345.  
  1346. DlgType = "Combination"
  1347. DlgTemplate = "T30XX"
  1348. Caption = $(FunctionTitle)
  1349.  
  1350.  
  1351. CBOptionsGreyed = {}
  1352. NotifyFields = {NO, NO}
  1353.  
  1354. Edit1Label = "Alt Network &Address:"
  1355. EditTextLim = 17
  1356. EditTextIn  = $(NetworkAddress)
  1357.  
  1358. Combo1Label = "&Max Frame Size:"
  1359.  
  1360. Combo1List = $(PacketsizeList)
  1361. Combo1Out  = $(PacketsizeValue)
  1362.  
  1363. ComboListItemsIn  = {Combo1List}
  1364. ComboListItemsOut = {Combo1Out}
  1365.  
  1366. CBOptionsGreyed = {}
  1367. ;RadioOptionGreyed = {}
  1368. NotifyFields = {NO, NO}
  1369.  
  1370.  
  1371. ;***********************************************************************
  1372. ; CONSTANTS FOR USING DIALOGS
  1373. ;***********************************************************************
  1374.  
  1375. [PacketsizeChoices]
  1376. Packetsize_1 = "1500",1500
  1377. Packetsize_2 = "2048",2048
  1378. Packetsize_3 = "4096",4096
  1379. Packetsize_4 = "4500",4500
  1380.  
  1381.